package com.lazycat.backend.controller.store;

import com.lazycat.backend.service.store.FetchStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class FetchStoreController {
    @Autowired
    private FetchStoreService fetchStoreService;

    @PostMapping("store/fetch/")
    public HashMap<String, Object> fetch(@RequestBody Map<String,String> map) {
        String user_id = map.get("user_id");
        return fetchStoreService.fetch(user_id);
    }
}
